package com.example.config;

import cn.hutool.core.io.file.FileReader;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.List;

@Configuration
public class MyConfig {
    @Bean(name = "dict")
    public HashMap<String, Integer> getDict() {
//        FileReader fileReader = new FileReader("M:\\Java_project\\movie_recommender\\src\\main\\resources\\static\\stopword.dic");
        HashMap<String, Integer> dic = new HashMap<>();
//        List<String> lines = fileReader.readLines();
//        for (int i = 0; i < lines.size(); i++) {
//            dic.put(lines.get(i).replace(" ", ""), i);
//        }
        return dic;
    }
}
